import http from '../util/http.js';

const API={
    get:(url,params)=>{
        return http({url:url,method:'get',params:params});
    },
    postjson:(url,data)=>{
        return http({url,method:"post",data:data})
    },
    postform:(url,params)=>{
        return http({url,method:"post",params:params});
    },
    del:(url,id)=>{
        url=url+'/'+id;return http({url:url,method:'delete'})
    },
    putjson:(url,data)=>{
        return http({url,method:"put",data:data})
    },
    putForm:function(url,params){return http({url:url,method:'put',params:params})}
};
export default API;